package com.gvt.util.vo;

public class Column {

	public String name;
	public int sqlType;
	public int sqlColumnLength;
	public int sqlDecimalLength;
	public boolean sqlNotNull;
	public boolean sqlReadOnly;
//	public NullableType hibernateType;
//	public Class javaType;
	public String sqlTypeName;
	public String defaultValue;
	
	@Override
	public String toString() {
		return "ColumnName: " + name + "\n" + 
				"sqlType: " + sqlType + "\n" +
				"sqlColumnLength: " + sqlColumnLength + "\n" +
				"sqlDecimalLength: " + sqlDecimalLength + "\n" +
				"sqlNotNull: " + sqlNotNull + "\n" +
				"sqlReadOnly: " + sqlReadOnly + "\n" +
//				"hibernateType: " + hibernateType + "\n" +
//				"javaType: " + javaType + "\n" +
				"sqlTypeName: " + sqlTypeName + "\n" +
				"defaultValue: " + defaultValue + "\n"
				;
	}

	public boolean equals(Object o) {
		boolean rv = false;
		if (o != null && o instanceof Column) {
			rv = (name.equals(((Column) o).name));
		}
		return rv;
	}

	public int hashCode() {
		return (name != null) ? name.hashCode() : 0;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

//	public NullableType getHibernateType() {
//		return hibernateType;
//	}
//
//	public void setHibernateType(NullableType hibernateType) {
//		this.hibernateType = hibernateType;
//	}
//
//	public Class getJavaType() {
//		return javaType;
//	}
//
//	public void setJavaType(Class javaType) {
//		this.javaType = javaType;
//	}
//
	public int getSqlColumnLength() {
		return sqlColumnLength;
	}

	public void setSqlColumnLength(int sqlColumnLength) {
		this.sqlColumnLength = sqlColumnLength;
	}

	public int getSqlDecimalLength() {
		return sqlDecimalLength;
	}

	public void setSqlDecimalLength(int sqlDecimalLength) {
		this.sqlDecimalLength = sqlDecimalLength;
	}

	public boolean isSqlNotNull() {
		return sqlNotNull;
	}

	public void setSqlNotNull(boolean sqlNotNull) {
		this.sqlNotNull = sqlNotNull;
	}

	public boolean isSqlReadOnly() {
		return sqlReadOnly;
	}

	public void setSqlReadOnly(boolean sqlReadOnly) {
		this.sqlReadOnly = sqlReadOnly;
	}

	public int getSqlType() {
		return sqlType;
	}

	public void setSqlType(int sqlType) {
		this.sqlType = sqlType;
	}

	public String getSqlTypeName() {
		return sqlTypeName;
	}

	public void setSqlTypeName(String sqlTypeName) {
		this.sqlTypeName = sqlTypeName;
	}

	public String getDefalutValue() {
		return defaultValue;
	}

	public void setDefalutValue(String defalutValue) {
		this.defaultValue = defalutValue;
	}

}
